package demo1;

public class Test {
    public static void drawPicture(Shape shape){
        shape.draw();
    }


    public static void main(String[] args) {
        //抽象类不能被实例化,只能向上转型
        //Shape shape = new Shape();
        Shape shape = new Car();
        shape.draw();
        drawPicture(new Car());
    }

//    public static void main(String[] args) {
//        Shape shape = new Car();
//        shape.draw();
//    }
}
